package com.liu.test.common;

/**
 * @Classname ObjectRestResponse
 * @Description
 * @Date 2019/8/14 11:20
 * @Created by linwu
 */
public class ObjectRestResponse<T> extends BaseResponse {

    T data;

    boolean rel = true;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isRel() {
        return rel;
    }

    public void setRel(boolean rel) {
        this.rel = rel;
    }

    public ObjectRestResponse() {
    }

    // build 模式
    public ObjectRestResponse rel(boolean rel) {
        this.setRel(rel);
        return this;
    }

    public ObjectRestResponse data(T data) {
        this.setData(data);
        return this;
    }

    public ObjectRestResponse message(String message) {
        this.setMessage(message);
        return this;
    }

    public ObjectRestResponse status(int status) {
        this.setStatus(status);
        return this;
    }
}
